package com.solidumgame.martillo.interfaces.start
{
	import flash.display.Sprite;
	import flash.display.Stage;
	import flash.events.Event;
	import flash.events.MouseEvent;

	public class StartGameUI extends Sprite
	{	
		private var btnPlay:btnJugar;
		
		public function StartGameUI(stage:Stage) 
		{	
			btnPlay = new btnJugar();
			btnPlay.addEventListener(MouseEvent.CLICK, Play);
			addChild(btnPlay);
			btnPlay.x=250;
			btnPlay.y=250;
		}
	
		public function Play(e:Event):void
		{	
			this.removeChild(btnPlay);
			btnPlay.removeEventListener(MouseEvent.CLICK,Play);
			this.dispatchEvent(new Event("startGame"));
		}
	}
}